String clazzTpl({package}) => """
import 'package:flutter/material.dart';
import 'package:$package/store/app_state.dart';
import 'package:$package/store/theme/theme_state.dart';
import 'package:observable_builder/observable_builder.dart';

class ThemeBuilder extends StatelessWidget {
  const ThemeBuilder({
    Key? key,
    required this.builder,
  }) : super(key: key);

  final Widget Function(BuildContext, ThemeState) builder;

  @override
  Widget build(BuildContext context) => ObservableBuilder<ThemeState>(
      create: AppState.observableTheme,
      memo: (theme) => [theme.type],
      builder: builder);
}
""";
